package command 
{
	import cn.inswf.framework.mvcs.Command;
	import cn.inswf.utils.DisplayObjectUtil;
	import flash.display.DisplayObjectContainer;
	import flash.external.ExternalInterface;
	import flash.utils.getTimer;
	import util.JsUtil;
	import view.MediaPlayerView;
	
	/**
	 * ...
	 * @author liwei
	 */
	public class MediaPlayerStartCommand extends Command 
	{
		[Inject]public var _container:DisplayObjectContainer;
		[Inject]public var _player:MediaPlayerView;
		
		public function MediaPlayerStartCommand() 
		{
			super();
			
		}
		override public function execute():void 
		{
			JsUtil.call("doTurnon()");
			DisplayObjectUtil.removeAll(_container);
			State.startTime = getTimer();
			_container.addChild(_player);
			_player.load(State.chapter, State.lesson);
		}
	}

}